.class public Lcom/brixd/niceapp/community/CommunityAppListFragment;
.super Lcom/brixd/niceapp/community/CommunityAppBaseFragment;
.source "CommunityAppListFragment.java"


# instance fields
.field private mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

.field private mShadowHeaderView:Landroid/view/View;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 35
    invoke-direct {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;-><init>()V

    .line 182
    return-void
.end method

.method public static getInstance(Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;)Lcom/brixd/niceapp/community/CommunityAppListFragment;
    .registers 5
    .param p0, "type"    # Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    .prologue
    .line 41
    new-instance v1, Lcom/brixd/niceapp/community/CommunityAppListFragment;

    invoke-direct {v1}, Lcom/brixd/niceapp/community/CommunityAppListFragment;-><init>()V

    .line 42
    .local v1, "fragment":Lcom/brixd/niceapp/community/CommunityAppListFragment;
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 43
    .local v0, "extra":Landroid/os/Bundle;
    const-string v2, "Type"

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v3

    invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 44
    invoke-virtual {v1, v0}, Lcom/brixd/niceapp/community/CommunityAppListFragment;->setArguments(Landroid/os/Bundle;)V

    .line 45
    return-object v1
.end method


# virtual methods
.method public getFragmentTitle()Ljava/lang/String;
    .registers 2

    .prologue
    .line 203
    const-string v0, ""

    return-object v0
.end method

.method protected getShadowHeaderView()Landroid/view/View;
    .registers 2

    .prologue
    .line 191
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mShadowHeaderView:Landroid/view/View;

    return-object v0
.end method

.method protected initActions(Landroid/view/View;)V
    .registers 4
    .param p1, "fragmentView"    # Landroid/view/View;

    .prologue
    .line 156
    invoke-super {p0, p1}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->initActions(Landroid/view/View;)V

    .line 158
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mAdapter:Landroid/widget/BaseAdapter;

    check-cast v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityAppListFragment$3;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityAppListFragment$3;-><init>(Lcom/brixd/niceapp/community/CommunityAppListFragment;)V

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->setOnItemClickListener(Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;)V

    .line 187
    return-void
.end method

.method protected initData()V
    .registers 4

    .prologue
    .line 62
    invoke-super {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->initData()V

    .line 64
    new-instance v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppListFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mAppModels:Ljava/util/ArrayList;

    invoke-direct {v0, v1, v2}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    iput-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mAdapter:Landroid/widget/BaseAdapter;

    .line 66
    iget v0, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mType:I

    sget-object v1, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_User:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v1

    if-ne v0, v1, :cond_22

    .line 67
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mAdapter:Landroid/widget/BaseAdapter;

    check-cast v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->setHideUserInfo(Z)V

    .line 69
    :cond_22
    return-void
.end method

.method protected initViews(Landroid/view/LayoutInflater;)Landroid/view/View;
    .registers 14
    .param p1, "inflater"    # Landroid/view/LayoutInflater;

    .prologue
    const/4 v11, 0x0

    .line 73
    const v7, 0x7f03004e

    const/4 v8, 0x0

    invoke-virtual {p1, v7, v8}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v6

    .line 75
    .local v6, "view":Landroid/view/View;
    const v7, 0x7f0a004a

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    iput-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mShadowHeaderView:Landroid/view/View;

    .line 76
    const v7, 0x7f0a002b

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    iput-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    .line 77
    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    iput-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshView:Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

    .line 79
    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    invoke-virtual {v7}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getRefreshableView()Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ListView;

    .line 80
    .local v4, "listView":Landroid/widget/ListView;
    new-instance v7, Landroid/graphics/drawable/ColorDrawable;

    invoke-direct {v7, v11}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v4, v7}, Landroid/widget/ListView;->setDivider(Landroid/graphics/drawable/Drawable;)V

    .line 81
    invoke-virtual {v4, v11}, Landroid/widget/ListView;->setDividerHeight(I)V

    .line 82
    invoke-virtual {v4, v11}, Landroid/widget/ListView;->setFadingEdgeLength(I)V

    .line 84
    invoke-static {}, Lcom/zuiapps/suite/utils/device/DeviceUtil;->isMeizu()Z

    move-result v7

    if-nez v7, :cond_41

    .line 85
    const/4 v7, 0x2

    invoke-virtual {v4, v7}, Landroid/widget/ListView;->setOverScrollMode(I)V

    .line 89
    :cond_41
    iget v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mType:I

    sget-object v8, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_New:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v8}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v8

    if-ne v7, v8, :cond_6c

    .line 90
    new-instance v2, Landroid/view/View;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppListFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v7

    invoke-direct {v2, v7}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    .line 91
    .local v2, "headerView":Landroid/view/View;
    new-instance v3, Landroid/widget/AbsListView$LayoutParams;

    const/4 v7, -0x1

    const/4 v8, 0x1

    const/high16 v9, 0x40a00000

    .line 92
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppListFragment;->getScreenDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v10

    invoke-static {v8, v9, v10}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v8

    float-to-int v8, v8

    invoke-direct {v3, v7, v8}, Landroid/widget/AbsListView$LayoutParams;-><init>(II)V

    .line 93
    .local v3, "layoutParams":Landroid/widget/AbsListView$LayoutParams;
    invoke-virtual {v2, v3}, Landroid/view/View;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 94
    invoke-virtual {v4, v2}, Landroid/widget/ListView;->addHeaderView(Landroid/view/View;)V

    .line 97
    .end local v2    # "headerView":Landroid/view/View;
    .end local v3    # "layoutParams":Landroid/widget/AbsListView$LayoutParams;
    :cond_6c
    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mHeaderView:Landroid/view/View;

    if-eqz v7, :cond_75

    .line 98
    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mHeaderView:Landroid/view/View;

    invoke-virtual {v4, v7}, Landroid/widget/ListView;->addHeaderView(Landroid/view/View;)V

    .line 102
    :cond_75
    iget v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mType:I

    sget-object v8, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_Tag:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v8}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v8

    if-ne v7, v8, :cond_8d

    .line 103
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityAppListFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    const v8, 0x7f080062

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getColor(I)I

    move-result v7

    invoke-virtual {v4, v7}, Landroid/widget/ListView;->setBackgroundColor(I)V

    .line 106
    :cond_8d
    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshView:Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

    iget-object v8, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mAdapter:Landroid/widget/BaseAdapter;

    invoke-virtual {v7, v8}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 108
    iget v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mType:I

    sget-object v8, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_User:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v8}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v8

    if-eq v7, v8, :cond_a8

    iget v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mType:I

    sget-object v8, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_Fav:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v8}, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->ordinal()I

    move-result v8

    if-ne v7, v8, :cond_f6

    .line 109
    :cond_a8
    const v7, 0x7f0a0049

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    .line 110
    .local v1, "emptyView":Landroid/view/View;
    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshView:Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

    invoke-virtual {v7, v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->setEmptyView(Landroid/view/View;)V

    .line 111
    const/16 v7, 0x8

    invoke-virtual {v1, v7}, Landroid/view/View;->setVisibility(I)V

    .line 113
    const v7, 0x7f0a00d9

    invoke-virtual {v1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    const-string v8, "\u8fd9\u91cc\u4ec0\u4e48\u90fd\u6ca1\u6709"

    invoke-virtual {v7, v8}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 114
    const v7, 0x7f0a00da

    invoke-virtual {v1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    .line 115
    .local v0, "btn":Landroid/widget/Button;
    invoke-virtual {v0, v11}, Landroid/widget/Button;->setVisibility(I)V

    .line 116
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v5

    .line 117
    .local v5, "userModel":Lcom/brixd/niceapp/model/UserModel;
    if-eqz v5, :cond_f7

    iget-object v7, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mCommonUser:Lcom/brixd/niceapp/model/CommonUserModel;

    if-eqz v7, :cond_f7

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/UserModel;->getUid()I

    move-result v7

    iget-object v8, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mCommonUser:Lcom/brixd/niceapp/model/CommonUserModel;

    invoke-virtual {v8}, Lcom/brixd/niceapp/model/CommonUserModel;->getUserId()I

    move-result v8

    if-ne v7, v8, :cond_f7

    .line 118
    const-string v7, "\u63a8\u8350\u66f4\u597d\u5e94\u7528"

    invoke-virtual {v0, v7}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 119
    new-instance v7, Lcom/brixd/niceapp/community/CommunityAppListFragment$1;

    invoke-direct {v7, p0, v5}, Lcom/brixd/niceapp/community/CommunityAppListFragment$1;-><init>(Lcom/brixd/niceapp/community/CommunityAppListFragment;Lcom/brixd/niceapp/model/UserModel;)V

    invoke-virtual {v0, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 151
    .end local v0    # "btn":Landroid/widget/Button;
    .end local v1    # "emptyView":Landroid/view/View;
    .end local v5    # "userModel":Lcom/brixd/niceapp/model/UserModel;
    :cond_f6
    :goto_f6
    return-object v6

    .line 137
    .restart local v0    # "btn":Landroid/widget/Button;
    .restart local v1    # "emptyView":Landroid/view/View;
    .restart local v5    # "userModel":Lcom/brixd/niceapp/model/UserModel;
    :cond_f7
    const-string v7, "\u53d1\u73b0\u66f4\u591a\u5e94\u7528"

    invoke-virtual {v0, v7}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 138
    new-instance v7, Lcom/brixd/niceapp/community/CommunityAppListFragment$2;

    invoke-direct {v7, p0}, Lcom/brixd/niceapp/community/CommunityAppListFragment$2;-><init>(Lcom/brixd/niceapp/community/CommunityAppListFragment;)V

    invoke-virtual {v0, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_f6
.end method

.method public onPause()V
    .registers 2

    .prologue
    .line 56
    invoke-super {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->onPause()V

    .line 57
    const-string v0, "CommunityAppListFragment"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 58
    return-void
.end method

.method public onResume()V
    .registers 2

    .prologue
    .line 50
    invoke-super {p0}, Lcom/brixd/niceapp/community/CommunityAppBaseFragment;->onResume()V

    .line 51
    const-string v0, "CommunityAppListFragment"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 52
    return-void
.end method

.method public scrollToHome()V
    .registers 4

    .prologue
    const/4 v2, 0x0

    .line 196
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityAppListFragment;->mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    invoke-virtual {v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getRefreshableView()Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    .line 197
    .local v0, "listView":Landroid/widget/ListView;
    invoke-virtual {v0, v2}, Landroid/widget/ListView;->setSelection(I)V

    .line 198
    invoke-virtual {v0, v2, v2}, Landroid/widget/ListView;->smoothScrollBy(II)V

    .line 199
    return-void
.end method
